<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>



    <script>
        //演示的变量
        // // 1.先声明，再赋值
        // var a;
        // a = 3;
        // console.log(a) //undefined


        // //2.声明的同时进行赋值
        // var b = "哈哈";
        // console.log(b)


        // var x, y, z = 10;
        // console.log(x + "：" + y + ":" + z)//undefined：undefined:10

        // alert("sdass") //Alert is not defined


        // console.log(window)
        // var a = 3;

        // var a = 4;

        //let
        // let a = 3; //用let声明的是一个变量，不可以重复声明，但是可以修改值

        // a = 4;
        //Identifier 'a' has already been declared


        //使用const声明的是一个常量，不可以重复声明，也不可以修改值
        const a = 3;
        a = 4; // Identifier 'a' has already been declared

        console.log(a) //4
    </script>
    <!-- <a href="">sssss</A> -->

</body>

</html>